/**
 * @Brief: The AT component drives the interface implementation
 * @Author:          
 * @Date: 2021-04-04
 * @Last Modified by:          
 * @Last Modified time: 2021-11-27
 */
#include <stddef.h>
#include <stdlib.h>
#include "heap_4.h"
#include "module.h"
/**
 * @brief Custom malloc for AT component.
 */
void *at_malloc(unsigned int nbytes)
{
    //return malloc(nbytes);
	return pvPortMalloc(nbytes);
}

/**
 * @brief Custom free for AT component.
 */
void  at_free(void *ptr)
{
	vPortFree(ptr);
    //free(ptr);
}

/**
 * @brief Gets the total number of milliseconds in the system.
 */
uint64_t at_get_ms(void)
{
   return (uint64_t)(get_tick()/2.4414*1000);
}
